<template>
  <div class="warp questionnaire">
    <div class="questionnaire-header"></div>
    <div class="questionnaire-main">
      <div class="questionnaire-main-box">
        <div class="questionnaire-main-title">保障形式帮助问卷</div>
        <div class="questionnaire-main-subject">一、是否为柳州本市户籍的城镇居民（不含下辖柳城、鹿寨、三江、融水、融安五县）</div>
        <div class="questionnaire-main-option">
          <van-radio-group v-model="radio">
            <van-radio name="1">A、是</van-radio>
            <van-radio name="2">B、否</van-radio>
          </van-radio-group>
        </div>
        <div class="footer">
          <div class="footer-btn" @click="saveForm">继续</div>
        </div>
      </div>
    </div>

    <van-dialog v-model="show" title :show-cancel-button="false" :showConfirmButton="false">
      <div class="dialog-title">问卷完成</div>
      <div class="dialog-main">
        <div>保障形式帮助问卷已完成，即将跳转至</div>
        <div class="dialog-main-text">本市中低偏下收入住房困难家庭</div>
        <div class="dialog-main-btn" @click="nexkClick">确 定</div>
      </div>
    </van-dialog>
  </div>
</template>

<script>
export default {
  name: 'questionnaire',
  data () {
    return {
      radio: '',
      show: false
    }
  },
  methods: {
    saveForm () {
      if (this.radio) {
        this.show = true
      } else {
        this.$toast('请先选择')
      }
    },
    nexkClick () {
      this.show = false
    }
  }
}
</script>

<style lang="stylus" scoped>
.questionnaire {
  background: url('~@/assets/img/questionnaire-bg.png') no-repeat bottom #1890FF;
  background-size: 100% auto;
  overflow: hidden;

  .questionnaire-header {
    width: 360px;
    height: 138px;
    margin: 88px auto;
    background: url('~@/assets/img/questionnaire-header.png');
    background-size: 100% 100%;
  }

  .questionnaire-main {
    width: 670px;
    background: #1890FF;
    margin: 10px auto;
    padding: 26px;

    .questionnaire-main-box {
      width: 100%;
      padding: 40px;
      box-sizing: border-box;
      background: #ffffff;

      .questionnaire-main-title {
        color: #0882F3;
        font-size: 32px;
        line-height: 50px;
        text-align: center;
        font-weight: 600;
        margin-bottom: 30px;
      }

      .questionnaire-main-option {
        margin: 20px 0;

        .van-radio {
          margin-bottom: 15px;
        }
      }

      .footer {
        margin: 10px 0;
      }
    }
  }

  .dialog-title {
    position: absolute;
    left: 50%;
    top: -40px;
    width: 480px;
    height: 90px;
    line-height: 90px;
    background: url('~@/assets/img/dialog-header-bg.png');
    background-size: 100% 100%;
    font-size: 32px;
    text-align: center;
    color: #ffffff;
    transform: translate(-50%, 0);
  }

  .dialog-main {
    padding: 80px 50px 50px 50px;
    font-size: 26px;
    line-height: 60px;
    text-align: center;
    background: url('~@/assets/img/dialog-main-bg.png');
    background-size: 100% 100%;

    .dialog-main-text {
      font-weight: 600;
    }

    .dialog-main-btn {
      height: 70px;
      line-height: 70px;
      background: linear-gradient(to bottom, #35CEFF, #1890FF);
      box-shadow: 0px 4px 16px 6px rgba(1, 108, 187, 0.43);
      border-radius: 35px;
      color: #ffffff;
      font-size: 32px;
      margin-top: 40px;
    }
  }
}

.questionnaire /deep/ .van-dialog {
  overflow: visible;
}
</style>
